
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>编辑</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" th:href="@{/layui/css/layui.css}" media="all">
  <link rel="stylesheet" th:href="@{/style/custom.css}" media="all">
</head>
<body>

  <div class="layui-form" lay-filter="msg-tpl-form-edit" id="msg-tpl-form-edit" style="padding: 20px 30px 0 0;">
    <input type="hidden" id="id" name="id" th:value="${template.id}"/>
    <div class="layui-form-item">
      <label class="layui-form-label">所属应用</label>
      <div class="layui-input-block">
        <select name="serviceName" lay-filter="select" lay-verify="required">
          <option value="">请选择</option>
          <option th:each="map,idx:${serviceNameList}" th:value="${map.key}" th:text="${map.value}" th:selected="${map.key == template.serviceCode}" ></option>
        </select>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">模板名称</label>
      <div class="layui-input-block">
        <input type="text" name="tplName" th:value="${template.tplName}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" lay-affix="clear">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">模板编码</label>
      <div class="layui-input-block">
        <input type="text" name="tplId" th:value="${template.tplId}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" lay-affix="clear">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">消息标题</label>
      <div class="layui-input-block">
        <input type="text" name="title" th:value="${template.title}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" lay-affix="clear">
      </div>
    </div>
    <label class="layui-form-label">发送方式</label>
    <div class="layui-input-block">
      <select name="mode" lay-filter="select" lay-verify="required">
        <option value="">请选择</option>
        <option value="SMS" th:selected="${'SMS' == template.mode}">短信</option>
        <option value="EMAIL" th:selected="${'EMAIL' == template.mode}">邮件</option>
      </select>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">模板内容</label>
      <div class="layui-input-block">
        <textarea rows="25" name="content" placeholder="请输入内容" th:text="${ template.content }" class="layui-textarea"></textarea>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">状态</label>
      <div class="layui-input-block">
        <input type="radio" name="status" value="Y" title="启用" th:checked="${ template.status == null || template.status == 'Y'} ? true">
        <input type="radio" name="status" value="N" title="禁用" th:checked="${ template.status == 'N'} ? true">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">备注</label>
      <div class="layui-input-block">
        <textarea name="remark" placeholder="请输入内容" th:text="${ template.remark }" class="layui-textarea"></textarea>
      </div>
    </div>
    <div class="layui-form-item layui-hide">
      <input type="button" lay-submit lay-filter="LAY-msg-tpl-front-submit" id="LAY-msg-tpl-front-submit" value="确认">
    </div>
  </div>

  <script th:src="@{/layui/layui.js}"></script>
  <script>

  </script>
</body>
</html>